<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/shopers', function (Request $request) {
    return $request->user();
});

//APP路由组
Route::group(['prefix' => 'app','middleware'=>'crosshttp'],function () {
    //app登录
    Route::post('login', 'App\AuthController@login');
    //退出登录
    Route::post('logout', 'App\AuthController@logout');
    //发送验证码
    Route::post('sendsms', 'App\AuthController@sendSms');
    //刷新token
    Route::post('refreshtoken', 'App\AuthController@refreshToken');

    //上传图片
    Route::post('imgupload','App\ImgController@upload');

    //    -------------------------------商家管理 设备管理----------------------------------
    Route::post('printerAll', 'App\ManagementDevice@getAllPrinters');//查看所有打印机设备
    Route::post('printerEdit','App\ManagementDevice@editPrinter');//打印机设备编辑
    Route::post('printerAdd', 'App\ManagementDevice@addPrinter');//打印机设备添加
    Route::post('printerOne', 'App\ManagementDevice@showOnePrinter');//某一打印机信息
    Route::post('printerDel', 'App\ManagementDevice@deleteOnePrinter');//删除打印机
    //    -------------------------------商家管理 员工管理----------------------------------
    Route::post('clerkAdd', 'App\ManagementEmployees@addClerk');//员工信息添加
    Route::post('clerkOne', 'App\ManagementEmployees@showOneClerk');//获取某一具体员工信息
    Route::post('clerkAll', 'App\ManagementEmployees@getAllClerks');//获取所有员工信息
    Route::post('clerkEdit','App\ManagementEmployees@editClerk');//员工信息编辑
    Route::post('clerkDel', 'App\ManagementEmployees@delClerk');//员工信息编辑
    //    -------------------------------版本更新----------------------------------
    Route::post('init', 'App\VersionController@init');//客户端初始化接口
    //    -------------------------------商家管理 商铺管理----------------------------------
    Route::post('shopAdd', 'App\ManagementShop@createShop');//创建商铺
//    Route::post('shopAll', 'App\ManagementShop@showAllShops');//所有商铺 不用了
    Route::post('shopAll', 'App\ShopController@showAllShops');//所有商铺 另外的
    Route::post('shopShow', 'App\ManagementShop@showEditShop');//展示修改商铺的资料
    Route::post('shopDel', 'App\ManagementShop@deleteShop');//删除商铺
    Route::post('shopEdit', 'App\ManagementShop@editShop');//修改商铺
    Route::post('shopUpload', 'App\ManagementShop@upload');//商铺的图片上传
    Route::post('shopOpen', 'App\ManagementShop@shopOpen');// 商家营业与否
    //    -------------------------------商家管理 房桌管理----------------------------------
    Route::post('createRoomTable', 'App\ManagementRoomTable@createRoomTable');//创建房桌
    Route::post('updateRoomTable', 'App\ManagementRoomTable@updateRoomTable');//修改房桌
    Route::post('showRoomTable', 'App\ManagementRoomTable@showRoomTable');//房桌展示
    Route::post('showOneRoomTable', 'App\ManagementRoomTable@showOneRoomTable');//房桌展示
    Route::post('deleteRoomTable', 'App\ManagementRoomTable@deleteRoomTable');//删除房桌
    //获取商圈
    Route::post ('cityget','Web\TraceAreaController@showTraceArea');//获取商圈
    //    -------------------------------商家管理 菜单管理----------------------------------
    Route::post('menuAll','App\ManagementMenu@showAllMenu');//获取所有的菜单信息
    Route::post('menuOne','App\ManagementMenu@showOneMenu');//获取某一菜单信息
//    Route::post('shop_menu/dish','App\ManagementMenu@showOneMenuDish');//获取某个分类下的所有菜式
    Route::post('menuAdd', 'App\ManagementMenu@addMenu');//添加菜单
    Route::post('menuEdit', 'App\ManagementMenu@editMenu');//编辑菜单
    Route::post('menuDel', 'App\ManagementMenu@delMenu');//删除菜单
    Route::post('menuUpload', 'App\ManagementMenu@upload');//上传菜单图片
    //    -------------------------------商家管理 菜式管理----------------------------------
    Route::post('dishAll','App\ManagementDish@showAllDishes');//获取所有的菜式信息
    Route::post('dishAllDesign','App\ManagementDish@showAllDesignDishes');  // 根据菜式获取旗下的所有菜式
    Route::post('showOrderDishes','App\ManagementDish@showOrderDishes');    // 获取商家每个分类以及每个分类下所有菜式
    Route::post('dishOne','App\ManagementDish@showOneDish');//获取某一菜式信息
    Route::post('dishAdd', 'App\ManagementDish@addDish');//添加菜式
    Route::post('dishEdit', 'App\ManagementDish@editDish');//编辑菜式
    Route::post('dishUpload', 'App\ManagementDish@upload');//上传菜式图片
    Route::post('dishStatus', 'App\ManagementDish@dishStatus');// 菜式上下架
    Route::post('dishDel', 'App\ManagementDish@dishDelete');// 菜式删除
    //    -------------------------------商家管理 订单管理----------------------------------
    Route::post('shopAllOrders', 'App\ManagementOrder@getAllOrders');//所有订单
    Route::post('shopCheckOrder', 'App\ManagementOrder@checkOneOrders');//所有订单
    Route::post('shopOneOrder', 'App\ManagementOrder@getOneOrder');//某一个订单
    Route::post('sureOrder', 'App\OrderOperation@sureOrder');//外卖接单
    Route::post('rejectOrder', 'App\OrderOperation@rejectOrder');//外卖拒单
    Route::post('arriveShop', 'App\OrderOperation@arriveShop');//预定到店
    Route::post('reserveAddDishes', 'App\OrderOperation@reserveAddDishes');//预定加菜
    Route::post('reserveCashBalance', 'App\OrderOperation@reserveCashBalance');//预定用现金结账
    Route::post('reserveEditMenu', 'App\OrderOperation@reserveEditMenu');//预定修改价格
    Route::post('sureForRefund', 'App\OrderOperation@sureForRefund');//同意退款
    //    -------------------------------钱包 银行卡管理----------------------------------
    Route::post('addCard', 'App\UserController@addCard');//添加银行卡
    Route::post('delCard', 'App\UserController@deleteCard');//删除银行卡
    Route::post('showCards', 'App\UserController@showCard');//展示银行卡
    Route::post('showCards', 'App\UserController@showCard');//展示银行卡
    //    -------------------------------钱包 提现----------------------------------
    Route::post('withdraw', 'App\UserController@withdraw');//申请提现
    //    -------------------------------钱包 明细----------------------------------
    Route::post('/funds','App\UserController@funds');  //钱包明细
    Route::post('/showMoney','App\UserController@showMoney');  //展示用户的金额
    //    -------------------------------用户 实名认证----------------------------------
    Route::post('/identify','App\UserController@identify');  //用户实名认证
    Route::post('/checkIdentify','App\UserController@checkIdentify');  //检查是否用户实名认证
    //    -------------------------------商家管理 财务管理----------------------------------
    Route::post('showFinance', 'App\ManagementFinance@showFinance');
});


